package com.example.neusoftfood_c213_zhong.service;



import com.example.neusoftfood_c213_zhong.beans.CollectResult;
import com.example.neusoftfood_c213_zhong.beans.Success;
import com.example.neusoftfood_c213_zhong.beans.UserInfo;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface UserService {

    @GET("userLogin.do")
    Call<UserInfo>login(@Query("username") String username,
                        @Query("userpass") String password);
    @GET("userRegister.do")
    Call<Success>register(@Query("username") String username,
                          @Query("userpass") String userpass,
                          @Query("mobilenum") String mobilenum,
                          @Query("address") String address,
                          @Query("comment") String comment);

    @GET("userCollectFood.do")
    Call<CollectResult> userCollectFood(
            @Query("user_id") String user_id,
            @Query("food_id") int food_id
    );

    @GET("getAllUserCollection.do")
    Call<UserInfo>getAllUserCollection(@Query("user_id")String user_id,
                                       @Query("flag")String flag);

}
